﻿@model IMS.DataAccess.Report
@{
    bool highlight = ViewBag.Highlight ?? new Nullable<bool>(false);
    var classes = new List<string> {
        "report-row",
        "priority-"+Model.Priority.ToLower()
    };
    if (highlight) {
        classes.Add("recent");
    }
    var cssClasses = String.Join(" ", classes.ToArray());
}
<tr class="@cssClasses" id="report-row-@Model.ReportID">
    <td class="centered">
        @Html.ActionLink(Model.OnSiteOperator.Name, "Details", new { controller = "OnSiteOperators", id = Model.OperatorID })
    </td>
    <td>
        @Model.Location
    </td>
    <td style="font-weight:normal">
        @(Model.Text.Length < 40 ? Model.Text : Model.Text.Substring(0,40) + "...")
    </td>
    <td>
        @String.Format("{0:yyyy-dd-MM}", Model.CreateDate)
    </td>
    <td>
        @String.Format("{0:HH:mm}", Model.CreateDate)
    </td>
    <td>
        <button id="@Model.ReportID" class="detail-button ui-icon-document">
            details
        </button>
        @*@Html.ActionLink("details", "Details", new { id = Model.ReportID }, new { @class = "details-link" })*@
    </td>
</tr>